package cn.hcbycloud.auth.mapper;

import cn.hcbycloud.auth.bo.ResourceActionBO;
import cn.hcbycloud.auth.model.Resource;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 资源表
 * @author gaoheng
 * @date 2022-01-21 22:50:41
 */
public interface ResourceMapper extends BaseMapper<Resource> {

    /**
     * 根据权限ID列表获取资源行为对象列表
     * @param permissionIdList
     * @param tenantId
     * @return
     */
    List<ResourceActionBO> selectResourceActionByPermissionIds(@Param("permissionIdList") List<String> permissionIdList, @Param("tenantId") String tenantId);

    /**
     * 根据权限编码列表获取资源行为对象列表
     * @param permissionCodeList
     * @param tenantId
     * @return
     */
    List<ResourceActionBO> selectResourceActionByPermissionCodes(@Param("permissionCodeList") List<String> permissionCodeList, @Param("tenantId") String tenantId);

}
